{include file="header.html"}
<link type="text/css" rel="stylesheet" href="/style/css_02/style.css" />
<link type="text/css" rel="stylesheet" href="/style/css/member.css" />
<link type="text/css" rel="stylesheet" href="/style/css_02/merchant.css" />
<style type="text/css">
    .h2{ font-weight: bold !important; color: #f60; font-size: 16px !important; font-style: italic }
    .shop-set table tr th{ text-align: left; white-space: nowrap; vertical-align: top }
    .tip{ color: #aaa; }
</style>
<div class="container menu-show">
    {include file="business/ur_here.html"}
    {include file="business/menu.html"}
    <div class="fn-right hy-r" id="m">
        <div class="shop-right">
            <h3>发布{$L.unit_yun}商品</h3>
            <a href="/business/yunbuy#m" class="shop-right2">商品管理</a>
        </div>
        <div class="shop-bor shop-set">
            <form action="" method="post" target="iframeNews">
                <input type="hidden" name="buy_id" value="" />
                <table width="100%" class="box-sizing" border="0">
                    <tr>
                        <td colspan="2" class="h2">基本信息</td>
                    </tr>
                    <tr>
                        <th></th>
                        <td style="line-height:1.8;padding:0 10px;">
                            <p style="color: #f00">
                                温馨提示：请不要发布违禁商品或恶意发布商品，一经发现将取消您的商家功能！<br>
                                发布上限：{$bus_limit}（可发布的商品数量上限，包含所有审核中与已下架的商品）
                            </p>
                        </td>
                    </tr>
                    <tr>
                        <th width="80">商品名称：</th>
                        <td><input type="text" name="title" value="" class="shop-set2" placeholder="必填" /></td>
                    </tr>
                    <tr>
                        <th width="80">副标题：</th>
                        <td><input type="text" name="sub_title" value="" class="shop-set2" placeholder="选填" /></td>
                    </tr>
                    <tr>
                        <th width="80">商品价值：</th>
                        <td><input type="text" name="true_price" value="" class="shop-set2" placeholder="选填（商品的实际价值）" /></td>
                    </tr>
                    <tr>
                        <th>商品分类：</th>
                        <td>
                            <select name="cid" class="shop-select">
                                <option value="0">请选择</option>
                                {foreach from=$yuncat item=m}
                                {if $m.ismenu eq 1 && $m.parentid eq 0}
                                <option value="{$m.id}">{$m.catname}</option>
                                {/if}
                                {/foreach}
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <th>商品品牌：</th>
                        <td>
                            <select name="bid" id="bid" class="shop-select">
                                <option value="0">请选择</option>
                                {foreach from=$brand item=m}
                                <option value="{$m.id}">{$m.catname}</option>
                                {/foreach}
                            </select>
                            <input type="text" name="brand_name" id="brand_name" class="shop-set2" style="width:22%;display: none;" />
                            <label><input type="checkbox" name="add_brand" value="1" onclick="select_addbrand($(this))" /> 其它品牌</label>
                        </td>
                    </tr>
                    <tr>
                        <th>商品图片：</th>
                        <td>
                            <div class="bus_goods_file">
                                <span class="tip">文件格式：gif jpg jpeg png 文件大小：1MB以内</span>
                                {$option.btn_title='选择商品图片'}
                                {upload_btn('goods','','',5,'','1',$option)}
                            </div>
                            <style type="text/css">
                                .bus_goods_file{ position: relative; }
                                .bus_goods_file span.tip{ position: absolute; left: 120px; top: 9px; }
                                /*.webuploader-pick{ border-radius: 5px; }*/
                                .uploader-list{ line-height: 1.5; padding-top:10px; }
                                .uploader-list b{ font-weight: normal; }
                            </style>
                        </td>
                    </tr>
                    <tr>
                        <th>商品详情：</th>
                        <td>
                            {$row.html_content}
                        </td>
                    </tr>
                    <tr>
                        <th>下单备注：</th>
                        <td>
                            <textarea name="tips" rows="5" class="shop-textarea" placeholder="选填，示例：请选择商品颜色（白、黑）："></textarea>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2" class="h2">云购参数</td>
                    </tr>
                    <tr>
                        <th>商品总需：</th>
                        <td>
                            <input type="text" name="goods_price" id="goods_price" value="" class="shop-set2" placeholder="{$L.unit_db_points}" onblur="bus_rebate()" />
                            <p style="color: #f00">平台抽佣：<span id="bus_rebate">￥0</span> （商品总需=实际价值+平台抽佣+商家利润）</p>
                        </td>
                    </tr>
                    <tr>
                        <th>单次价格：</th>
                        <td>
                            <select name="price" id="price" class="shop-select">
                                <option value="1">1</option>
                                <option value="5">5</option>
                                <option value="10">10</option>
                                <option value="100">100</option>
                            </select>
                            <p class="tip">{$L.unit_db_points}/每人次（总需人次=商品总需/单次价格）</p>
                        </td>
                    </tr>
                    <tr>
                        <th>最大期数：</th>
                        <td>
                            <input type="text" name="max_qishu" value="500" class="shop-set2" placeholder="" />
                            <p class="tip">必填（不得超过500期）</p>
                        </td>
                    </tr>
                    <tr>
                        <th>限购人次：</th>
                        <td>
                            <input type="text" name="limit" value="0" class="shop-set2" placeholder="" />
                            <p class="tip">选填（单个会员限购人次，默认不限制）</p>
                        </td>
                    </tr>
                    <tr>
                        <th>&nbsp;</th>
                        <td>
                            <input type="submit" name="submit" value="发布该商品" class="shop-set3" />
                            <p style="color: #f00">重要提示：发布前请仔细检查，审核后不可再更新！</p>
                        </td>
                    </tr>
                </table>
            </form>
        </div>
    </div>
</div>
<div class="merchant"></div>
{include file="footer.html"}
<script src="/style/css_02/common_02.js"></script>
<script type="text/javascript">
    function bus_rebate(){
        var bus_rebate = parseFloat('{$config_other.bus_rebate|default}');
        var goods_price = $('#goods_price').val();
        $('#bus_rebate').html('￥'+(bus_rebate*goods_price/100).toFixed(2));
    }
    function select_addbrand(obj){
        if(obj.is(':checked')){
            $('#bid').hide();
            $('#brand_name').show();
        }else{
            $('#brand_name').hide();
            $('#bid').show();
        }
    }
</script>